﻿// -----------------------------------------------------------------------
// <copyright file="CreateLinkCommand.cs">
// Copyright (c) 2014 Andrey Veselov. All rights reserved.
// License:  Microsoft Public License (MS-PL)
// Contacts: http://andrey.moveax.com  andrey@moveax.com
// </copyright>
// -----------------------------------------------------------------------

namespace Moveax.DataAccess.Cqrs.Highway.EF.UnitTests.Model.Commands.Links
{
	using System.Diagnostics.Contracts;

	public class CreateLinkCommand : ICommand
	{
		public int Id { get; set; }

		public int UserId { get; set; }

		public string Title { get; set; }

		public string Url { get; set; }

		public CreateLinkCommand(int userId, string title, string url)
		{
			Contract.Requires(0 < userId);
			Contract.Requires(!string.IsNullOrEmpty(title));
			Contract.Requires(!string.IsNullOrEmpty(url));

			UserId = userId;
			Title = title.Trim();
			Url = url.Trim();
		}
	}
}
